package com.prs.crm.dao.sys.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.sys.DeskBottomSetDao;
import com.prs.crm.domain.sys.DeskBottomSet;

public class DeskBottomSetDaoImpl extends BaseDaoImpl<DeskBottomSet> implements DeskBottomSetDao{

	@Override
	public DeskBottomSet getDeskBottomSet(final String code) {
		Criteria criteria=this.getSession().createCriteria(DeskBottomSet.class);
		criteria.add(Restrictions.eq("type",code));
		List result=criteria.list();
		if(result==null||result.size()==0){
			return null;
		}
		return (DeskBottomSet) criteria.list().get(0);
	}
}
